﻿<Page x:Class="PTCScheduler.MainWindow_Page"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      d:DesignHeight="480" d:DesignWidth="825"
	Title="Parent Teacher Conference Scheduler">

    <!--Dock Panel similar to BorderLayout in Java-->
    <DockPanel>
        <!--Menu Bar to allow for knowledge transfer and easy navigation.-->
        <Menu DockPanel.Dock="Top" Height="40" Background="#FF2D9DCF" Foreground="#FFFFF8F8">
            <!--File item for print,export, and exit functions.-->
            <MenuItem Style="{StaticResource MenuItemStyle}">
                <MenuItem.Header>
                    _File
                </MenuItem.Header>
                <!--Add Menu to Add new teachers, students, and counselors.-->
                <MenuItem Header="_Add" Style="{StaticResource SubMenuItemStyle}" >
                    <MenuItem.Icon>
                        <Image Source="/PTCScheduler_Software_Engineering;component/Images/addperson1.png" MaxWidth="32" MaxHeight="32" />
                    </MenuItem.Icon>
                    <MenuItem Header="New Student" Style="{StaticResource SubMenuItemStyle}" Click="NewStudent_Click" />
                    <MenuItem Header="New Teacher" Style="{StaticResource SubMenuItemStyle}" Click="NewTeacher_Click" />
                    <MenuItem Header="New Counselor" Style="{StaticResource SubMenuItemStyle}" Click="NewCounselor_Click" />
                </MenuItem>
                <MenuItem Header="_Exit" Style="{StaticResource SubMenuItemStyle}" Click="Exit_Click">
                    <MenuItem.Icon>
                        <Image Source="/PTCScheduler_Software_Engineering;component/Images/exit.png" MaxWidth="32" MaxHeight="32" />
                    </MenuItem.Icon>
                </MenuItem>
            </MenuItem>

            <!--View item for view by teacher, selected week, entire month, 
            by student functions.-->
            <MenuItem Style="{StaticResource MenuItemStyle}">
                <MenuItem.Header>
                    _Search
                </MenuItem.Header>
                <!--View By Week item.-->
                <MenuItem Header="Week" Style="{StaticResource SubMenuItemStyle}" Click="viewbyweek_Click">
                    <MenuItem.Icon>
                        <Image Source="/PTCScheduler_Software_Engineering;component/Images/week.png" MaxHeight="32" MaxWidth="32"/>
                    </MenuItem.Icon>
                </MenuItem>
                <!--View By Student Item.-->
                <MenuItem Header="Student" Style="{StaticResource SubMenuItemStyle}" Click="viewbystudent_Click">
                    <MenuItem.Icon>
                        <Image Source="/PTCScheduler_Software_Engineering;component/Images/student.png" MaxWidth="32" MaxHeight="32"/>
                    </MenuItem.Icon>
                </MenuItem>
                <!--View By Teacher Item.-->
                <MenuItem Header="Teacher" Style="{StaticResource SubMenuItemStyle}" Click="viewbyteacher_Click">
                    <MenuItem.Icon>
                        <Image Source="/PTCScheduler_Software_Engineering;component/Images/teacher.png" MaxWidth="32" MaxHeight="32"/>
                    </MenuItem.Icon>
                </MenuItem>
            </MenuItem>

            <!--Edit item to go in and change conference time or location.-->
            <MenuItem Style="{StaticResource MenuItemStyle}">
                <MenuItem.Header>
                    _Update
                </MenuItem.Header>
                <MenuItem Header="Personnel" Style="{StaticResource SubMenuItemStyle}" >
                    <MenuItem.Icon>
                        <Image Source="/PTCScheduler_Software_Engineering;component/Images/personnel.png" MaxHeight="32" MaxWidth="32"/>
                    </MenuItem.Icon>
                    <MenuItem Header="Student" Style="{StaticResource SubMenuItemStyle}" Click="UpdateStudent_Click"/>
                    <MenuItem Header="Teacher" Style="{StaticResource SubMenuItemStyle}" Click="UpdateTeacher_Click" />
                    <MenuItem Header="Counselor" Style="{StaticResource SubMenuItemStyle}" Click="UpdateCounselor_Click"/>
                </MenuItem>
                <MenuItem Header="Conference" Style="{StaticResource SubMenuItemStyle}" Click="UpdateConference_Click">
                    <MenuItem.Icon>
                        <Image Source="/PTCScheduler_Software_Engineering;component/Images/conference1.png" MaxHeight="32" MaxWidth="32"/>
                    </MenuItem.Icon>
                </MenuItem>
            </MenuItem>

            <!--Help menu for help (operating software) documentation for user.-->
            <MenuItem Style="{StaticResource MenuItemStyle}" Click="HelpMenu_Click">
                <MenuItem.Icon>
                    <Image Source="/PTCScheduler_Software_Engineering;component/Images/Q_Mark.png" />
                </MenuItem.Icon>
                <MenuItem.Header>
                    _Help
                </MenuItem.Header>
            </MenuItem>
        </Menu><!--End menu bar.-->

        <!--Grid Panel for calendar on left side of each page.-->
        <Grid DockPanel.Dock="Left" Width="259" Background="#422D9DCF">
            
            <!--Calendar Tool inserted into viewbox for expansion-->
            <Viewbox Height="225" HorizontalAlignment="Left" Margin="6,35,0,0" 
                     Name="viewbox1" VerticalAlignment="Top" Width="247">
                <Calendar Height="170" Name="homeCalendar" Width="180" SelectedDatesChanged="homeCalendar_SelectedDatesChanged" FirstDayOfWeek="Sunday" />
            </Viewbox>
            
            <!--Prompt user that this is scheduling station for new conference.-->
            <Label Content="Schedule Conference:" Height="28" Name="scheduleconferencelbl" 
                   Style="{StaticResource LabelStyle}" />
            
            <!--Date Selected label to prompt user where date selected will go.-->
            <Label Content="Date Selected:" Name="dateselectedlbl" Height="25" Margin="6,266,0,0" 
                   Style="{StaticResource LabelStyle}" Width="104" />
            
            <!--Textbox to hold date selected.-->
            <TextBox Height="23" HorizontalAlignment="Left" Margin="6,297,0,0" Name="dateselectedtextBox"
                     VerticalAlignment="Top" Width="247" Background="White" IsReadOnly="True" />
            
            <!--Schedule button in order to handle new conference.-->
            <Button Height="45" HorizontalAlignment="Left" Margin="6,357,0,0" Name="scheduleBtn" VerticalAlignment="Top" Width="96" FontFamily="Arial" FontWeight="Bold" 
                    Foreground="White" Background="#FF2D9DCF" BorderBrush="White" BorderThickness="2" 
                    Click="scheduleBtn_Click" Style="{StaticResource ButtonStyle}">
                <Image Source="/PTCScheduler_Software_Engineering;component/Images/schedule.png"></Image>
            </Button>
            
            <!--Cannot schedule for date that's passed alert warning label-->
            <Label Height="28" HorizontalAlignment="Left" Margin="6,326,0,0" Name="warninglbl" VerticalAlignment="Top" FontFamily="Arial" FontWeight="Bold" 
                   FontSize="14" Foreground="Red" Visibility="Hidden">
                <!--Set warning message for label.-->
                <Label.Content>
                    Cannot schedule for past date.
                </Label.Content>
            </Label>
        </Grid><!--End left dock panel.-->
        
        <!--Right dock panel.-->
        <Grid>
            <!--Upcoming Conferences label to help user navigate to listbox of upcoming conferences.-->
            <Label Content="Today's Conferences: " Height="28" HorizontalAlignment="Left" Margin="6,6,0,0" Name="todaysconferenceslbl" 
                   VerticalAlignment="Top" Style="{StaticResource LabelStyle}" />

            <!--Data grid for scheduled student conferences information.-->
            <DataGrid HorizontalAlignment="Stretch" Margin="6,35,27,16" Name="dataGridMainWindow" IsReadOnly="True" Style="{StaticResource DataGridViewStyle}">
        </DataGrid>
            <Label Content="No scheduled conferences today." Height="28" HorizontalAlignment="Left" Margin="6,66,0,0" Name="noconferenceslbl" VerticalAlignment="Top" Style="{StaticResource LabelStyle}" Visibility="Hidden" />
            <Button Background="White" BorderBrush="White" Height="34" HorizontalAlignment="Right" Margin="408,0,90,0" Name="btnExport" VerticalAlignment="Top" Width="50" Click="btnExport_Click">
                <Image Source="/PTCScheduler_Software_Engineering;component/Images/export.jpg" ImageFailed="Image_ImageFailed" />
            </Button>
            <Button Background="White" BorderBrush="White" Height="34" HorizontalAlignment="Right" Margin="464,0,30,0" Name="btnPrint" VerticalAlignment="Top" Width="49" Click="btnPrint_Click">
                <Image Source="/PTCScheduler_Software_Engineering;component/Images/print.png" />
            </Button>
        </Grid>
    </DockPanel><!--End right dock panel.-->
</Page>
